package com.arong.swing.db.entity;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class Dept implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public static final String ROOT_ID = "1";
	
	private String deptId;

	private String deptName;
	
	private String upDeptId;
	
	
	public String getUpDeptId() {
		return upDeptId;
	}

	public void setUpDeptId(String upDeptId) {
		this.upDeptId = upDeptId;
	}

	public String getDeptId() {
		return deptId;
	}

	public void setDeptId(String deptId) {
		this.deptId = deptId;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public boolean equals(Object obj) {
		boolean equals = false;
		if (obj != null && obj instanceof Dept) {
			Dept another = (Dept) obj;
			equals = new EqualsBuilder()
			.append(deptId, another.getDeptId()).isEquals();
		}
		return equals;
	}

	public int hashCode() {
		return new HashCodeBuilder(17, 37).append(deptId).toHashCode();
	}

	public String toString() {
		return new ToStringBuilder(this).append("deptId", this.getDeptId())
				.toString();
	}
}